<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
//数据库表文件 (geren.sql);

Route::get('/', function () {
    return view('welcome');
});

Route::get('/img', 'CaptchaController@captcha');

//注册路由
Route::controller('/users', 'User\UserController');
 
//后台登录
Route::get('/login', 'Admin\loginController@login');
Route::post('/login', 'Admin\loginController@doLogin');

//后台路由组
// Route::group(['middleware'=>'login'], function(){
	//退出登录
	Route::get('/logout', 'Admin\loginController@logout');
	//后台首页
	Route::get('/admin', 'Admin\adminController@index');

	//用户管理
	Route::get('/user/changpass', 'Admin\userController@changpass');
	Route::post('/user/changpass', 'Admin\userController@dochangpass');
	Route::get('/user/aupdate','Admin\userController@aupdate');
	Route::resource('/user', 'Admin\userController');
// });

//商品分类管理 (无限极分类)
Route::controller('/cate', 'Admin\cateController');

//个人博客
Route::resource('/demo', 'Me\demoController');
//电子相册
Route::controller('/album', 'Album\albumController');

// 

